<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ taglib prefix="kfn" uri="http://www.kaifamiao.com/functions" %>

<html>
    <head>
        <title>用户注册</title>
        <link rel="icon" href="${pageContext.request.contextPath}/images/kaifamiao.jpg" type="image/x-icon">
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/kaifamiao.jpg" type="image/x-icon" media="screen">
        <link rel="stylesheet" href="/bootstrap/css/bootstrap.css">
        <link rel="stylesheet" href="/font-awesome/css/font-awesome.css">
        <link rel="stylesheet" href="/styles/sign.css">
    </head>
    <body>
        <div class="row sign">
            <div class="col-6 sign-logo"></div>
            <div class="col-6 sign-form">
                <p class="title">新用户注册</p>
                <%-- 使用自定义函数实现显示提示信息并从指定作用域中删除该属性 --%>
                <p class="tip">${ kfn:flash( 'message' , 'session' , pageContext )}</p>

                <form action="${pageContext.request.contextPath}/customer/sign/up" method="post">
                    <div class="form-row">
                        <i class="fa fa-star-o"></i>
                        <input type="text" name="nickname" value="${nickname}" placeholder="昵称" autocomplete="off">
                        <c:remove var="nickname" scope="session" />
                    </div>
                    <div class="form-row">
                        <i class="fa fa-user-o"></i>
                        <input type="text" name="username" value="${username}" placeholder="登录名称" autocomplete="off">
                        <c:remove var="username" scope="session" />
                    </div>
                    <div class="form-row">
                        <i class="fa fa-keyboard-o"></i>
                        <input type="password" name="password" placeholder="登录密码" autocomplete="off">
                        <i class="fa fa-eye"></i>
                    </div>
                    <div class="form-row">
                        <i class="fa fa-keyboard-o"></i>
                        <input type="password" name="confirm" placeholder="确认密码" autocomplete="off">
                    </div>
                    <div class="form-row-captcha">
                        <input type="text" name="captcha" placeholder="验证码" autocomplete="off">
                        <img src="${pageContext.request.contextPath}/captcha/image/sign/up">
                    </div>
                    <script src="${pageContext.request.contextPath}/scripts/captcha.js"></script>
                    <div class="form-row">
                        <button type="submit" class="btn btn-primary btn-sm">注册</button>
                    </div>
                </form>
                <p class="link">已有账号？<a href="${pageContext.request.contextPath}/customer/sign/in">点此登录</a></p>
            </div>
        </div>

    </body>
</html>
